/*
 * usb_data_transfer.h
 *
 *  Created on: Sep 23, 2023
 *      Author: colourfate
 */

#ifndef INC_USB_DATA_TRANSFER_H_
#define INC_USB_DATA_TRANSFER_H_

#include <stdint.h>
#include <stdio.h>
#if defined(__CC_ARM)
#pragma anon_unions
#endif
typedef enum {
	USB_DATA_TYPE_CMD_FPS,
	USB_DATA_TYPE_DATA,
	USB_DATA_TYPE_LOG,
	USB_DATA_TYPE_MAX
} usb_data_type;

typedef struct {
	uint16_t fps;
} usb_control_cmd;

void usb_transfer_init(void);
int usb_data_store_f(float *data);
void usb_data_send(void);
int usb_get_cmd(usb_control_cmd *cmd);
void receive_data_parse();

#endif /* INC_USB_DATA_TRANSFER_H_ */
